local zhenxi_vs = fk.CreateSkill{
    name = "#os_heg__zhenxi_vs",
}

zhenxi_vs:addEffect("viewas",{
  handly_pile = true,
  min_card_num = 1,
  max_card_num = 1,
  card_filter = function(self, player, to_select, selected)
    if #selected == 0  then
      local card = Fk:getCardById(to_select)
      if card.type ~= Card.TypeTrick and (card.suit == Card.Club or card.suit == Card.Diamond) then
        local delay = Fk:cloneCard(card.suit == Card.Club and "supply_shortage" or "indulgence")
        delay:addSubcard(to_select)
        return player:canUse(delay, {bypass_distances = true})
      end
    end
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:cloneCard(Fk:getCardById(cards[1]).suit == Card.Club and "supply_shortage" or "indulgence")
    c.skillName = "os_heg__zhenxi"
    c:addSubcards(cards)
    return c
  end,
})

return zhenxi_vs